As specified in IEEE802.3, a standard Ethernet Media Access Control (MAC) frame includes a destination MAC address and a source MAC address, which both have a length of 6 bytes. The destination MAC address identifies physical equipment where an Ethernet frame is sent, and the source MAC address identifies physical equipment that sends the Ethernet frame. The first bit (the lowest bit of the first byte) of the destination MAC address indicates whether the destination MAC address is a unicast address or a multicast address, in which 0 represents a unicast address and 1 represents a multicast address. If all bits of the destination MAC address are 1, it indicates a broadcast MAC address, and the Ethernet MAC frame with the broadcast MAC address is forwarded to all physical equipment of a corresponding network.
After receiving the Ethernet MAC frame, the equipment adds corresponding forwarding entries, and records the source MAC address, a virtual local area network (VLAN) identifier (VLAN ID), and an input port number of the Ethernet MAC frame, which is called learning the MAC address.
In order to expand the port or bandwidth, the same equipments will be connected together to act as one equipment, which is called cascade connection. Ports for connecting cascaded equipments are called cascade ports or interconnection ports.
IEEE 802.3ad specifies a manner for realizing link aggregation. Specifically, two or more physical ports are bound together to act as one logical port, which achieves the functions of load sharing and link protection. The logical port is called a link-aggregation group. The load sharing refers to sending a packet via different physical ports in the link-aggregation group according to a specific aggregation routing algorithm, for example, according to a destination MAC address or a source MAC address in the packet. The link protection refers that, when a certain physical port in the link-aggregation group fails, a packet that originally plans to be sent via the physical port is automatically sent via another physical port in the link aggregation group.
As shown in FIG. 1, the cascade connection of a plurality of equipments or interconnection of boards on the same equipment includes a first board 100, a second board 110, and a switch board 120. The first board 100 includes an input port, port 1, an output port, port 3, and a cascade port, port 22. The second board 110 includes a port, port 4. Port 22 is adapted to connect the second board 110 to realize the cascade connection between the first board 100 and the second board 110 and the aggregation of port 3 and port 4. The first board 100 receives an Ethernet MAC frame from the switch board 120 via port 1, and possibly selects port 3 to forward the received Ethernet MAC frame according to an aggregation algorithm in consideration of the aggregation of port 3 and port 4. Thus, the second board 110 cannot learn a source MAC address of the Ethernet MAC frame. As a result, after receiving the Ethernet MAC frame sent to the switch board 120 via port 4, the second board 110 broadcasts the frame all the time. In order to solve this problem, the synchronization of MAC addresses is required. Nowadays, the commonly adopted manner is to use a central processing unit (CPU) to realize the synchronization of MAC addresses. Specifically, the CPU on the first board 100 periodically reads all MAC addresses in the MAC address table, encapsulates the MAC addresses into a data segment of the Ethernet MAC frame, and sends the Ethernet MAC frame to the second board 110. After receiving the Ethernet packet, the second board 110 reads the MAC addresses requiring synchronization from the data segment of the Ethernet MAC frame, and configures the MAC addresses into the MAC address table of this board.
However, when the CPU is adapted to realize the synchronization of MAC addresses, since generally a large number of MAC addresses exist and usually reach over 16 k, a large amount of CPU resources are occupied and the processing performance of the CPU is influenced. Meanwhile, the CPU synchronizes the MAC addresses according to a certain cycle. If the synchronization is not performed in time, data packets may possibly be broadcasted within a specific time period, thereby influencing the processing performance of the network.